function check_game(){
	$.ajax({
	  url: 'GetAllUsersConnected',
	  success: function( data ) {
		if(data.slice(0,100).search("true") != -1) 
		{
			window.clearInterval(id);
			window.location = 'WebIOManager';
		}

	  }
	});
}

var id = window.setInterval(check_game, 3000);